#LOCAL("ShowBillingMand", 0)#IF(#Shop.FeatureMaxValue.Basket)#SET("ShowBillingMand",1)#ENDIF
#LOCAL("RegField", #Shop.RegistrationField)
  #WITH_ERROR(#FormError)
      <div class="Dialog AddressDialog">
        <div class="SizeContainer">
        #LOCAL("OneBoxVisible", 0)




        #IF(#RegField.VATID.IsVisible)
        #LOCAL("ShopCountry",#Shop.Address.Country.Code2)
        #SET("OneBoxVisible", 1)
            <div class="InputBlock">
              <div class="InputLabelling">{VATID} #IF(#RegField.VATID.IsMandatory){MandatoryStar}#ELSIF(#RegField.VATID.IsBillingAddressMandatory)#SET("OptionalFields", 1){MandatoryBillingAddressStars}#ENDIF</div>
              <div class="InputField">
                <input name="VATID"
                       class="Text ep-metaparse #IF(#RegField.VATID.IsMandatory OR #RegField.VATID.IsBillingAddressMandatory) ep.uiValidate({required:true,info:'#IF(NOT (#ShopCountry EQ "ES" OR #ShopCountry EQ "PT")){VATIDNote}<br />#ENDIF {Example}: #VATID_EXAMPLE(#Shop.Address.Country.CountryID)' #IF(#FormError_VATID),valid:false #ENDIF }) #ELSE ep.uiInput({info:'#IF(NOT (#ShopCountry EQ "ES" OR #ShopCountry EQ "PT")){VATIDNote}<br />#ENDIF {Example}: #VATID_EXAMPLE(#Shop.Address.Country.CountryID)' #IF(#FormError_VATID),valid:false #ENDIF}) #ENDIF"
                       value="#IF(#INPUT.VATID)#INPUT.VATID#ELSIF(#VATID)#VATID#ENDIF" />
                <noscript><div>#IF(NOT (#ShopCountry EQ "ES" OR #ShopCountry EQ "PT")){VATIDNote}<br />#ENDIF {Example}: #VATID_EXAMPLE(#Shop.Address.Country.CountryID)</div></noscript></div>
            </div>
        #ENDLOCAL
        #ENDIF




        #IF(#OneBoxVisible)
          <div class="InputBlockSpacer"></div>
        #ENDIF
        #ENDLOCAL
        #LOCAL("TwoBoxVisible", 0)
        #IF(#RegField.Gender.IsVisible)
        #SET("TwoBoxVisible", 1)
            <div class="InputBlock">
              <div class="InputLabelling">{Gender} #IF(#RegField.Gender.IsMandatory){MandatoryStar}#ELSIF(#RegField.Gender.IsBillingAddressMandatory)#SET("OptionalFields", 1){MandatoryBillingAddressStars}#ENDIF</div>
              <div class="InputField">
                <input type="radio" class="ep-metaparse #IF(#RegField.Gender.IsMandatory) ep.uiValidate({required:true #IF(#FormError_Gender) ,valid:false #ENDIF }) #ELSE ep.uiInput() #ENDIF" name="Gender" value="1" #IF(#DEFINED(#Gender) AND #Gender == "1")checked="checked" #ENDIF />{Male}
                <input type="radio" class="ep-metaparse #IF(#RegField.Gender.IsMandatory) ep.uiValidate({required:true #IF(#FormError_Gender) ,valid:false #ENDIF }) #ELSE ep.uiInput() #ENDIF" name="Gender" value="2" #IF(#DEFINED(#Gender) AND #Gender == "2")checked="checked" #ENDIF />{Female}
              </div>
            </div>
        #ENDIF
        #IF(#RegField.Salutation.IsVisible)
        #SET("TwoBoxVisible", 1)
            <div class="InputBlock">
              <div class="InputLabelling">{Salutation} #IF(#RegField.Salutation.IsMandatory){MandatoryStar}#ELSIF(#RegField.Salutation.IsBillingAddressMandatory)#SET("OptionalFields", 1){MandatoryBillingAddressStars}#ENDIF</div>
              <div class="InputField">
                <input class="Text ep-metaparse #IF(#RegField.Salutation.IsMandatory) ep.uiValidate({required:true #IF(#FormError_Salutation) ,valid:false #ENDIF }) #ELSE ep.uiInput() #ENDIF" name="Salutation" value="#IF(#Salutation)#Salutation#ENDIF" />
              </div>
            </div>
        #ENDIF


        #IF(#RegField.Title.IsVisible)
        #SET("TwoBoxVisible", 1)
#REM
            <div class="InputBlock">
              <div class="InputLabelling">{Title} #IF(#RegField.Title.IsMandatory){MandatoryStar}#ELSIF(#RegField.Title.IsBillingAddressMandatory)#SET("OptionalFields", 1){MandatoryBillingAddressStars}#ENDIF</div>
              <div class="InputField">
                <input class="Text ep-metaparse #IF(#RegField.Title.IsMandatory) ep.uiValidate({required:true #IF(#FormError_Title) ,valid:false #ENDIF }) #ELSE ep.uiInput() #ENDIF" name="Title" value="#IF(#Title)#Title#ENDIF" />
              </div>
            </div>
#ENDREM



            <div class="InputBlock">
              <div class="InputLabelling">{Title} #IF(#RegField.Title.IsMandatory){MandatoryStar}#ELSIF(#RegField.Title.IsBillingAddressMandatory)#SET("OptionalFields", 1){MandatoryBillingAddressStars}#ENDIF</div>
              <div class="InputField">
                <select name="Title" class="LongText ep-metaparse #IF(#RegField.Title.IsMandatory) #ELSE ep.uiInput() #ENDIF">
		    <option value="">{EmptyEntry}</option>
                    <option value="Mr" #IF(#Title EQ "Mr") selected="selected" #ENDIF>Mr</option>
		    <option value="Mrs" #IF(#Title EQ "Mrs") selected="selected" #ENDIF>Mrs</option>
		    <option value="Ms" #IF(#Title EQ "Ms") selected="selected" #ENDIF>Ms</option>
		    <option value="Miss" #IF(#Title EQ "Miss") selected="selected" #ENDIF>Miss</option>
		    <option value="Dr" #IF(#Title EQ "Dr") selected="selected" #ENDIF>Dr</option>
                </select>
              </div>
            </div>



        #ENDIF





        #IF(#RegField.FirstName.IsVisible)
        #SET("TwoBoxVisible", 1)
            <div class="InputBlock">
              <div class="InputLabelling">{FirstName} #IF(#RegField.FirstName.IsMandatory){MandatoryStar}#ELSIF(#RegField.FirstName.IsBillingAddressMandatory)#SET("OptionalFields", 1){MandatoryBillingAddressStars}#ELSIF(#RegField.FirstName.IsBillingAddressMandatory)#SET("OptionalFields", 1){MandatoryBillingAddressStars}#ENDIF</div>
              <div class="InputField"><input class="Text ep-metaparse #IF(#RegField.FirstName.IsMandatory) ep.uiValidate({required:true #IF(#FormError_FirstName) ,valid:false #ENDIF }) #ELSE ep.uiInput() #ENDIF" name="FirstName" id="FirstName" value="#IF(#FirstName)#FirstName#ENDIF" #IF(#RegField.DisplayName.IsVisible AND #RegField.LastName.IsVisible)onchange="SFautofillAddress('FirstName','LastName','DisplayName')"#ENDIF /></div>
            </div>
        #ENDIF
        #IF(#RegField.MiddleName.IsVisible)
        #SET("TwoBoxVisible", 1)
            <div class="InputBlock">
              <div class="InputLabelling">{MiddleName} #IF(#RegField.MiddleName.IsMandatory){MandatoryStar}#ELSIF(#RegField.MiddleName.IsBillingAddressMandatory)#SET("OptionalFields", 1){MandatoryBillingAddressStars}#ENDIF</div>
              <div class="InputField"><input class="Text ep-metaparse #IF(#RegField.MiddleName.IsMandatory) ep.uiValidate({required:true #IF(#FormError_MiddleName) ,valid:false #ENDIF }) #ELSE ep.uiInput() #ENDIF" name="MiddleName" value="#IF(#MiddleName)#MiddleName#ENDIF" /></div>
            </div>
        #ENDIF
        #IF(#RegField.LastName.IsVisible)
        #SET("TwoBoxVisible", 1)
            <div class="InputBlock">
              <div class="InputLabelling">{LastName} #IF(#RegField.LastName.IsMandatory){MandatoryStar}#ELSIF(#RegField.LastName.IsBillingAddressMandatory)#SET("OptionalFields", 1){MandatoryBillingAddressStars}#ENDIF</div>
              <div class="InputField"><input class="Text ep-metaparse #IF(#RegField.LastName.IsMandatory) ep.uiValidate({required:true #IF(#FormError_LastName) ,valid:false #ENDIF }) #ELSE ep.uiInput() #ENDIF" name="LastName" id="LastName" value="#IF(#LastName)#LastName#ENDIF"  #IF(#RegField.DisplayName.IsVisible AND #RegField.FirstName.IsVisible)onchange="SFautofillAddress('FirstName','LastName','DisplayName')"#ENDIF /></div>
            </div>
        #ENDIF
        #IF(#TwoBoxVisible)
          <div class="InputBlockSpacer"></div>
        #ENDIF
        #IF(#RegField.Company.IsVisible)
            <div class="InputBlock">
              <div class="InputLabelling">{Company} #IF(#RegField.Company.IsMandatory){MandatoryStar}#ELSIF(#RegField.Company.IsBillingAddressMandatory)#SET("OptionalFields", 1){MandatoryBillingAddressStars}#ENDIF</div>
              <div class="InputField"><input class="Text ep-metaparse #IF(#RegField.Company.IsMandatory) ep.uiValidate({required:true #IF(#FormError_Company) ,valid:false #ENDIF }) #ELSE ep.uiInput() #ENDIF" name="Company" value="#IF(#Company)#Company#ENDIF" /></div>
            </div>
        #ENDIF
        #IF(#RegField.Department.IsVisible)
        #SET("OneBoxVisible", 1)
            <div class="InputBlock">
              <div class="InputLabelling">{Department} #IF(#RegField.Department.IsMandatory){MandatoryStar}#ELSIF(#RegField.Department.IsBillingAddressMandatory)#SET("OptionalFields", 1){MandatoryBillingAddressStars}#ENDIF</div>
              <div class="InputField"><input class="Text ep-metaparse #IF(#RegField.Department.IsMandatory) ep.uiValidate({required:true #IF(#FormError_Department) ,valid:false #ENDIF }) #ELSE ep.uiInput() #ENDIF" name="Department" value="#IF(#Department)#Department#ENDIF" /></div>
            </div>
        #ENDIF
        #IF(#TwoBoxVisible)
          <div class="InputBlockSpacer"></div>
        #ENDIF

        #IF(#RegField.DisplayName.IsVisible)
        #SET("TwoBoxVisible", 1)
            <div class="InputBlock">
              <div class="InputLabelling">{DisplayName} #IF(#RegField.DisplayName.IsMandatory){MandatoryStar}#ELSIF(#RegField.DisplayName.IsBillingAddressMandatory)#SET("OptionalFields", 1){MandatoryBillingAddressStars}#ENDIF</div>
              <div class="InputField"><input class="Text ep-metaparse #IF(#RegField.DisplayName.IsMandatory) ep.uiValidate({required:true #IF(#FormError_DisplayName) ,valid:false #ENDIF }) #ELSE ep.uiInput() #ENDIF" name="DisplayName" id="DisplayName" value="#IF(#DisplayName)#DisplayName#ENDIF" /></div>
            </div>
        #ENDIF
        #IF(#RegField.AddressExtension.IsVisible)
        #SET("TwoBoxVisible", 1)
            <div class="InputBlock">
              <div class="InputLabelling">{AddressExtension} #IF(#RegField.AddressExtension.IsMandatory){MandatoryStar}#ELSIF(#RegField.AddressExtension.IsBillingAddressMandatory)#SET("OptionalFields", 1){MandatoryBillingAddressStars}#ENDIF</div>
              <div class="InputField"><input class="Text ep-metaparse #IF(#RegField.AddressExtension.IsMandatory) ep.uiValidate({required:true #IF(#FormError_AddressExtension) ,valid:false #ENDIF }) #ELSE ep.uiInput() #ENDIF" name="AddressExtension" value="#IF(#AddressExtension)#AddressExtension#ENDIF" /></div>
            </div>
        #ENDIF

        #ENDLOCAL
        #LOCAL("ThreeBoxVisible", 0)
        #IF(#RegField.Street.IsVisible)
        #SET("ThreeBoxVisible", 1)
            <div class="InputBlock">
              <div class="InputLabelling">{Street} #IF(#RegField.Street.IsMandatory){MandatoryStar}#ELSIF(#RegField.Street.IsBillingAddressMandatory)#SET("OptionalFields", 1){MandatoryBillingAddressStars}#ENDIF</div>
              <div class="InputField"><input class="Text ep-metaparse #IF(#RegField.Street.IsMandatory) ep.uiValidate({required:true #IF(#FormError_Street) ,valid:false #ENDIF }) #ELSE ep.uiInput() #ENDIF" name="Street" value="#IF(#Street)#Street#ENDIF" /></div>
            </div>
        #ENDIF
        #IF(#RegField.Street2.IsVisible)
        #SET("ThreeBoxVisible", 1)
            <div class="InputBlock">
              <div class="InputLabelling">{Street2} #IF(#RegField.Street2.IsMandatory){MandatoryStar}#ELSIF(#RegField.Street2.IsBillingAddressMandatory)#SET("OptionalFields", 1){MandatoryBillingAddressStars}#ENDIF</div>
              <div class="InputField"><input class="Text ep-metaparse #IF(#RegField.Street2.IsMandatory) ep.uiValidate({required:true #IF(#FormError_Street2) ,valid:false #ENDIF }) #ELSE ep.uiInput() #ENDIF" name="Street2" value="#IF(#Street2)#Street2#ENDIF" /></div>
            </div>
        #ENDIF
        #IF(#RegField.CodePorte.IsVisible)
        #SET("ThreeBoxVisible", 1)
            <div class="InputBlock">
              <div class="InputLabelling">{CodePorte} #IF(#RegField.CodePorte.IsMandatory){MandatoryStar}#ELSIF(#RegField.CodePorte.IsBillingAddressMandatory)#SET("OptionalFields", 1){MandatoryBillingAddressStars}#ENDIF</div>
              <div class="InputField"><input class="Text ep-metaparse #IF(#RegField.CodePorte.IsMandatory) ep.uiValidate({required:true #IF(#FormError_CodePorte) ,valid:false #ENDIF }) #ELSE ep.uiInput() #ENDIF" name="CodePorte" value="#IF(#CodePorte)#CodePorte#ENDIF" /></div>
            </div>
        #ENDIF
        #IF(#RegField.Zipcode.IsVisible)
        #SET("ThreeBoxVisible", 1)
            <div class="InputBlock">
              <div class="InputLabelling">{Zipcode} #IF(#RegField.Zipcode.IsMandatory){MandatoryStar}#ELSIF(#RegField.Zipcode.IsBillingAddressMandatory)#SET("OptionalFields", 1){MandatoryBillingAddressStars}#ENDIF</div>
              <div class="InputField"><input class="Text ep-metaparse #IF(#RegField.Zipcode.IsMandatory) ep.uiValidate({required:true #IF(#FormError_Zipcode) ,valid:false #ENDIF }) #ELSE ep.uiInput() #ENDIF" name="Zipcode" value="#IF(#Zipcode)#Zipcode#ENDIF" /></div>
            </div>
        #ENDIF
        #IF(#RegField.City.IsVisible)
        #SET("ThreeBoxVisible", 1)
            <div class="InputBlock">
              <div class="InputLabelling">{City} #IF(#RegField.City.IsMandatory){MandatoryStar}#ELSIF(#RegField.City.IsBillingAddressMandatory)#SET("OptionalFields", 1){MandatoryBillingAddressStars}#ENDIF</div>
              <div class="InputField"><input class="Text ep-metaparse #IF(#RegField.City.IsMandatory) ep.uiValidate({required:true #IF(#FormError_City) ,valid:false #ENDIF }) #ELSE ep.uiInput() #ENDIF" name="City" value="#IF(#City)#City#ENDIF" /></div>
            </div>
        #ENDIF
      #LOCAL("HasUS", 0)
        #IF(#RegField.CountryID.IsVisible)
        #SET("ThreeBoxVisible", 1)
            <div class="InputBlock">
              <div class="InputLabelling">{Country} #IF(#RegField.CountryID.IsMandatory){MandatoryStar}#ELSIF(#RegField.CountryID.IsBillingAddressMandatory)#SET("OptionalFields", 1){MandatoryBillingAddressStars}#ENDIF</div>
              <div class="InputField">
                <select name="CountryID" class="LongText ep-metaparse ep.uiInput()" id="General#ID#SPACE[0]_CountryID">
                    #LOCAL("AddressCountryID", #CountryID)
                    <option value="">{EmptyEntry}</option>#LOOP(#Shop.ShopCountries)#IF(#Code2 EQ "US")#SET("HasUS", 1)#ENDIF
                    <option abbr="#Code2" value="#CountryID"#IF(#DEFINED(#AddressCountryID) AND #AddressCountryID EQ #CountryID OR NOT #DEFINED(#AddressCountryID) AND #IsDefault) selected="selected"#ENDIF>#IF(#Native)#Native #IF(NOT (#English EQ #Native))(#English)#ENDIF #ELSE#English#ENDIF</option>#ENDLOOP
                    #ENDLOCAL
                </select>
              </div>
            </div>
        #ENDIF
      #IF(#HasUS)
      #SET("ThreeBoxVisible", 1)
        <div class="InputBlock#IF(NOT #RegField.State.IsVisible) HideElement#ENDIF" id="General#ID#SPACE[0]_State">
          <div class="InputLabelling">{State} #IF(#RegField.State.IsMandatory){MandatoryStar}#ELSIF(#RegField.State.IsBillingAddressMandatory)#SET("OptionalFields", 1){MandatoryBillingAddressStars}#ENDIF</div>
          <div class="InputField">
          <input class="Text ep-metaparse #IF(#RegField.State.IsMandatory) ep.uiValidate({required:true #IF(#FormError_State) ,valid:false #ENDIF }) #ELSE ep.uiInput() #ENDIF" name="State" value="#IF(#State)#State#ENDIF" id="General#ID#SPACE[0]_Form" />
                    <noscript><p style="width:201px;">{USStateNoScript}</p></noscript>
          </div>
        </div>
        #SNIPPET("INC-USStates", "Prefix,InputName", "General", "State")
      #ELSE
        #SET("ThreeBoxVisible", 1)
        #IF(#RegField.State.IsVisible)
          <div class="InputBlock">
            <div class="InputLabelling">{State} #IF(#RegField.State.IsMandatory){MandatoryStar}#ELSIF(#RegField.State.IsBillingAddressMandatory)#SET("OptionalFields", 1){MandatoryBillingAddressStars}#ENDIF</div>
            <div class="InputField"><input class="Text ep-metaparse  #IF(#RegField.State.IsMandatory) ep.uiValidate({required:true #IF(#FormError_State) ,valid:false #ENDIF }) #ELSE ep.uiInput() #ENDIF" name="State" value="#IF(#State)#State#ENDIF" /></div>
          </div>
        #ENDIF
      #ENDIF
      #ENDLOCAL
        #IF(#ThreeBoxVisible)
            <div class="InputBlockSpacer"></div>
        #ENDIF
        #ENDLOCAL
        #LOCAL("FourBoxVisible", 0)
        #IF(#RegField.JobTitle.IsVisible)
        #SET("FourBoxVisible", 1)
            <div class="InputBlock">
              <div class="InputLabelling">{JobTitle} #IF(#RegField.JobTitle.IsMandatory){MandatoryStar}#ELSIF(#RegField.JobTitle.IsBillingAddressMandatory)#SET("OptionalFields", 1){MandatoryBillingAddressStars}#ENDIF</div>
              <div class="InputField"><input class="Text ep-metaparse #IF(#RegField.JobTitle.IsMandatory) ep.uiValidate({required:true #IF(#FormError_JobTitle) ,valid:false #ENDIF }) #ELSE ep.uiInput() #ENDIF" name="JobTitle" value="#IF(#JobTitle)#JobTitle#ENDIF" /></div>
            </div>
        #ENDIF
        #IF(#RegField.Phone.IsVisible)
        #SET("FourBoxVisible", 1)
            <div class="InputBlock">
              <div class="InputLabelling">{Phone} #IF(#RegField.Phone.IsMandatory){MandatoryStar}#ELSIF(#RegField.Phone.IsBillingAddressMandatory)#SET("OptionalFields", 1){MandatoryBillingAddressStars}#ENDIF</div>
              <div class="InputField"><input class="Text ep-metaparse #IF(#RegField.Phone.IsMandatory) ep.uiValidate({required:true #IF(#FormError_Phone) ,valid:false #ENDIF }) #ELSE ep.uiInput() #ENDIF" name="Phone" value="#IF(#Phone)#Phone#ENDIF" /></div>
            </div>
        #ENDIF
        #IF(#RegField.PhoneBusiness.IsVisible)
        #SET("FourBoxVisible", 1)
            <div class="InputBlock">
              <div class="InputLabelling">{PhoneBusiness} #IF(#RegField.PhoneBusiness.IsMandatory){MandatoryStar}#ELSIF(#RegField.PhoneBusiness.IsBillingAddressMandatory)#SET("OptionalFields", 1){MandatoryBillingAddressStars}#ENDIF</div>
              <div class="InputField"><input class="Text ep-metaparse #IF(#RegField.PhoneBusiness.IsMandatory) ep.uiValidate({required:true #IF(#FormError_PhoneBusiness) ,valid:false #ENDIF }) #ELSE ep.uiInput() #ENDIF" name="PhoneBusiness" value="#IF(#PhoneBusiness)#PhoneBusiness#ENDIF" /></div>
            </div>
        #ENDIF
        #IF(#RegField.PhonePrivate.IsVisible)
        #SET("FourBoxVisible", 1)
            <div class="InputBlock">
              <div class="InputLabelling">{PhonePrivate} #IF(#RegField.PhonePrivate.IsMandatory){MandatoryStar}#ELSIF(#RegField.PhonePrivate.IsBillingAddressMandatory)#SET("OptionalFields", 1){MandatoryBillingAddressStars}#ENDIF</div>
              <div class="InputField"><input class="Text ep-metaparse #IF(#RegField.PhonePrivate.IsMandatory) ep.uiValidate({required:true #IF(#FormError_PhonePrivate) ,valid:false #ENDIF }) #ELSE ep.uiInput() #ENDIF" name="PhonePrivate" value="#IF(#PhonePrivate)#PhonePrivate#ENDIF" /></div>
            </div>
        #ENDIF
        #IF(#RegField.PhoneCell.IsVisible)
        #SET("FourBoxVisible", 1)
            <div class="InputBlock">
              <div class="InputLabelling">{PhoneCell} #IF(#RegField.PhoneCell.IsMandatory){MandatoryStar}#ELSIF(#RegField.PhoneCell.IsBillingAddressMandatory)#SET("OptionalFields", 1){MandatoryBillingAddressStars}#ENDIF</div>
              <div class="InputField"><input class="Text ep-metaparse #IF(#RegField.PhoneCell.IsMandatory) ep.uiValidate({required:true #IF(#FormError_PhoneCell) ,valid:false #ENDIF }) #ELSE ep.uiInput() #ENDIF" name="PhoneCell" value="#IF(#PhoneCell)#PhoneCell#ENDIF" /></div>
            </div>
        #ENDIF
        #IF(#RegField.Fax.IsVisible)
        #SET("FourBoxVisible", 1)
            <div class="InputBlock">
              <div class="InputLabelling">{Fax} #IF(#RegField.Fax.IsMandatory){MandatoryStar}#ELSIF(#RegField.Fax.IsBillingAddressMandatory)#SET("OptionalFields", 1){MandatoryBillingAddressStars}#ENDIF</div>
              <div class="InputField"><input class="Text ep-metaparse #IF(#RegField.Fax.IsMandatory) ep.uiValidate({required:true #IF(#FormError_Fax) ,valid:false #ENDIF }) #ELSE ep.uiInput() #ENDIF" name="Fax" value="#IF(#Fax)#Fax#ENDIF" /></div>
            </div>
        #ENDIF
        #IF(#FourBoxVisible)
            <div class="InputBlockSpacer"></div>
        #ENDIF
        #ENDLOCAL
        #LOCAL("FithBoxVisible", 0)
        #IF(#RegField.EMail.IsVisible)
        #SET("FithBoxVisible", 1)
            <div class="InputBlock">
              <div class="InputLabelling">{EMail} #IF(#RegField.EMail.IsMandatory){MandatoryStar}#ELSIF(#RegField.EMail.IsBillingAddressMandatory)#SET("OptionalFields", 1){MandatoryBillingAddressStars}#ENDIF</div>
              <div class="InputField"><input class="Text ep-metaparse #IF(#RegField.EMail.IsMandatory) ep.uiValidate({required:true,type:'email' #IF(#FormError_EMail) ,valid:false #ENDIF }) #ELSE ep.uiValidate({type:'email'}) #ENDIF" name="EMail" value="#IF(#NewEMail)#NewEMail#ELSIF(#EMail)#EMail#ENDIF" /></div>
            </div>
            #MENU("AdditionalFormElements")#INCLUDE(#Template)#ENDMENU
        #ENDIF
        #IF(#RegField.EMailBusiness.IsVisible)
        #SET("FithBoxVisible", 1)
            <div class="InputBlock">
              <div class="InputLabelling">{EMailBusiness} #IF(#RegField.EMailBusiness.IsMandatory){MandatoryStar}#ELSIF(#RegField.EMailBusiness.IsBillingAddressMandatory)#SET("OptionalFields", 1){MandatoryBillingAddressStars}#ENDIF</div>
              <div class="InputField"><input class="Text ep-metaparse #IF(#RegField.EMailBusiness.IsMandatory) ep.uiValidate({required:true,type:'email' #IF(#FormError_EMailBusiness) ,valid:false #ENDIF }) #ELSE ep.uiValidate({type:'email'}) #ENDIF" name="EMailBusiness" value="#IF(#EMailBusiness)#EMailBusiness#ENDIF" /></div>
            </div>
        #ENDIF
        #IF(#RegField.EMailPrivate.IsVisible)
        #SET("FithBoxVisible", 1)
            <div class="InputBlock">
              <div class="InputLabelling">{EMailPrivate} #IF(#RegField.EMailPrivate.IsMandatory){MandatoryStar}#ELSIF(#RegField.EMailPrivate.IsBillingAddressMandatory)#SET("OptionalFields", 1){MandatoryBillingAddressStars}#ENDIF</div>
              <div class="InputField"><input class="Text ep-metaparse #IF(#RegField.EMailPrivate.IsMandatory) ep.uiValidate({required:true,type:'email' #IF(#FormError_EMailPrivate) ,valid:false #ENDIF }) #ELSE ep.uiValidate({type:'email'}) #ENDIF" name="EMailPrivate" value="#IF(#EMailPrivate)#EMailPrivate#ENDIF" /></div>
            </div>
        #ENDIF
        #IF(#RegField.IsHtmlEMailAllowed.IsVisible)
        #SET("FithBoxVisible", 1)
            <div class="InputBlock">
              <div class="InputLabelling">{IsHtmlEMailAllowed} #IF(#RegField.IsHtmlEMailAllowed.IsMandatory){MandatoryStar}#ELSIF(#RegField.IsHtmlEMailAllowed.IsBillingAddressMandatory)#SET("OptionalFields", 1){MandatoryBillingAddressStars}#ENDIF</div>
              <div class="InputField">
                <input type="radio" class="ep-metaparse #IF(#RegField.IsHtmlEMailAllowed.IsMandatory) ep.uiValidate({required:true #IF(#FormError_IsHtmlEMailAllowed) ,valid:false #ENDIF }) #ELSE ep.uiInput() #ENDIF" name="IsHtmlEMailAllowed" value="1" #IF(NOT #DEFINED(#Session.User.IsHtmlEMailAllowed) OR #Session.User.IsHtmlEMailAllowed)checked="checked" #ENDIF />{yes}
                <input type="radio" class="ep-metaparse #IF(#RegField.IsHtmlEMailAllowed.IsMandatory) ep.uiValidate({required:true #IF(#FormError_IsHtmlEMailAllowed) ,valid:false #ENDIF }) #ELSE ep.uiInput() #ENDIF" name="IsHtmlEMailAllowed" value="0" #IF(#DEFINED(#Session.User.IsHtmlEMailAllowed) AND NOT #Session.User.IsHtmlEMailAllowed)checked="checked" #ENDIF />{no}
              </div>
            </div>
        #ENDIF
            <input type="hidden" name="IsLoginCookieAllowed" value="1" />
        #IF(#FithBoxVisible)
          <div class="InputBlockSpacer"></div>
        #ENDIF
        #ENDLOCAL
        #LOCAL("SixthBoxVisible", 0)
        #IF(#RegField.Birthday.IsVisible)
        #SET("SixthBoxVisible", 1)
            <div class="InputBlock">
              <div class="InputLabelling">{Birthday} #IF(#RegField.Birthday.IsMandatory){MandatoryStar}#ELSIF(#RegField.Birthday.IsBillingAddressMandatory)#SET("OptionalFields", 1){MandatoryBillingAddressStars}#ENDIF</div>
              <div class="InputField"><input class="Text ep-metaparse #IF(#RegField.Birthday.IsMandatory) ep.uiValidate({required:true,type:'date' #IF(#FormError_Birthday) ,valid:false #ENDIF }) #ELSE ep.uiValidate({type:'date'}) #ENDIF" name="Birthday" value="#IF(#Birthday)#Birthday[date]#ENDIF" /><br />
              <samp>{Example} #Now[date]</samp>
              </div>
            </div>
        #ENDIF
        #IF(#RegField.URL.IsVisible)
        #SET("SixthBoxVisible", 1)
            <div class="InputBlock">
              <div class="InputLabelling">{URL} #IF(#RegField.URL.IsMandatory){MandatoryStar}#ELSIF(#RegField.URL.IsBillingAddressMandatory)#SET("OptionalFields", 1){MandatoryBillingAddressStars}#ENDIF</div>
              <div class="InputField"><input class="Text ep-metaparse #IF(#RegField.URL.IsMandatory) ep.uiValidate({required:true,type:'url' #IF(#FormError_URL) ,valid:false #ENDIF }) #ELSE ep.uiValidate({type:'url'}) #ENDIF" name="URL" value="#IF(#URL)#URL#ENDIF" /></div>
            </div>
        #ENDIF
        #ENDLOCAL
        </div>
        <div class="ClearBoth"></div>
      </div>
  #IF(#RegField.BankCode.IsVisible OR
      #RegField.BankName.IsVisible OR
      #RegField.BankAccountNo.IsVisible OR
      #RegField.BankAccountHolder.IsVisible)
      <div class="ClearBoth"></div>
      <div class="TableHead"><div>{AccountData}</div></div>
      <div class="Dialog AddressDialog">
        <div class="SizeContainer">
        #IF(#RegField.BankAccountHolder.IsVisible)
          <div class="InputBlock">
            <div class="InputLabelling">{BankAccountHolder} #IF(#RegField.BankAccountHolder.IsMandatory){MandatoryStar}#ELSIF(#RegField.BankAccountHolder.IsBillingAddressMandatory)#SET("OptionalFields", 1){MandatoryBillingAddressStars}#ENDIF</div>
            <div class="InputField"><input class="Text ep-metaparse #IF(#RegField.BankAccountHolder.IsMandatory) ep.uiValidate({required:true #IF(#FormError_BankAccountHolder) ,valid:false #ENDIF }) #ELSE ep.uiInput() #ENDIF" name="BankAccountHolder" value="#IF(#BankAccountHolder)#BankAccountHolder#ENDIF" /></div>
          </div>
        #ENDIF
        #IF(#RegField.BankAccountNo.IsVisible)
          <div class="InputBlock">
            <div class="InputLabelling">{BankAccountNo} #IF(#RegField.BankAccountNo.IsMandatory){MandatoryStar}#ELSIF(#RegField.BankAccountNo.IsBillingAddressMandatory)#SET("OptionalFields", 1){MandatoryBillingAddressStars}#ENDIF</div>
            <div class="InputField"><input class="Text ep-metaparse #IF(#RegField.BankAccountNo.IsMandatory) ep.uiValidate({required:true #IF(#FormError_BankAccountNo) ,valid:false #ENDIF }) #ELSE ep.uiInput() #ENDIF" name="BankAccountNo" value="#IF(#BankAccountNo)#BankAccountNo#ENDIF" /></div>
          </div>
        #ENDIF
        #IF(#RegField.BankCode.IsVisible)
          <div class="InputBlock">
            <div class="InputLabelling">{BankCode} #IF(#RegField.BankCode.IsMandatory){MandatoryStar}#ELSIF(#RegField.BankCode.IsBillingAddressMandatory)#SET("OptionalFields", 1){MandatoryBillingAddressStars}#ENDIF</div>
            <div class="InputField"><input class="Text ep-metaparse #IF(#RegField.BankCode.IsMandatory) ep.uiValidate({required:true #IF(#FormError_BankCode) ,valid:false #ENDIF }) #ELSE ep.uiInput() #ENDIF" name="BankCode" value="#IF(#BankCode)#BankCode#ENDIF" /></div>
          </div>
        #ENDIF
        #IF(#RegField.BankName.IsVisible)
          <div class="InputBlock">
            <div class="InputLabelling">{BankName} #IF(#RegField.BankName.IsMandatory){MandatoryStar}#ELSIF(#RegField.BankName.IsBillingAddressMandatory)#SET("OptionalFields", 1){MandatoryBillingAddressStars}#ENDIF</div>
            <div class="InputField"><input class="Text ep-metaparse #IF(#RegField.BankName.IsMandatory) ep.uiValidate({required:true #IF(#FormError_BankName) ,valid:false #ENDIF }) #ELSE ep.uiInput() #ENDIF" name="BankName" value="#IF(#BankName)#BankName#ENDIF" /></div>
          </div>
        #ENDIF
        </div>

        <div class="ClearBoth"></div>
      </div>
   #ENDIF

  #ENDWITH_ERROR
#ENDLOCAL#ENDLOCAL
  #LOCAL("CustomerRegistration", #GREP(#GREP(#Shop.RegistrationSet,"Attribute.IsUserDefined"),"IsVisible"))
    #IF(#COUNT(#CustomerRegistration))
      <div class="ClearBoth"></div>
      <div class="TableHead"><div>{FurtherInformation}</div></div>
      <div class="Dialog AddressDialog">
        <div class="SizeContainer">
          #LOOP(#CustomerRegistration)#INCLUDE("INC-Attributes")#ENDLOOP
        </div>
        <div class="ClearBoth"></div>
      </div>
    #ENDIF
  #ENDLOCAL
